But I gotta have it
Watch out for the damage
(Vanessa Paradis, "Gotta Have It")
AND
´´ - boolean AND
OR
´´ - boolean OR
XOR
´´ - exclusive OR
<
´´, ``>
´´, ``<=
´´, ``>=
´´, ``<>
´´
- case insensitive string comparison
<$export>
On startup, hsc will look for an options file, which will be parsed for command line options before the actual command line options passed from CLI. Values set in the options file can be overwritten by command line options later.
The format of the options file is easy as can be: it consists of several lines, with every line containing one single options, and, if necessary, also a ``=
´´ and a value. An example options
file could look like this:
FROM=include/stdmacros.hsc TO=www:sepp/ COMPACT IGNORE=notes|styleThe options file always has to be names hsc.options.
SEPP=(HUGO)However, if
HUGO
has not been defined and assigned
a value before, this will result in an error message.
Conditional assignments now only assign a value to the
target attribute, if the source attribute has been defined.
Simply use a ``?=
´´ instead of the ``=
´´ assignment
operator:
SEPP?=HUGOThis becomes handy for macros which are more or less only extensions to real html-tags:
<$macro xBODY TEXT:color LINK:color> <BODY TEXT?=TEXT LINK?=LINK BACKGROUND="image/back.png"> </$macro>Now you can use the macro
<xBODY>
as an replacement
for the tag <BODY>
: using a simple
<xBODY>will result in
<BODY BACKGROUND="image/back.png">but a
<xBODY TEXT='#123456' LINK='#654321'>will lead to
<BODY TEXT='#123456' LINK='#654321' BACKGROUND="image/back.png">thus also adding the attributes
TEXT
and LINK
to the tag call.
On the first sight, it might seem that there is only the simple condition ``if attribute is set..´´ is possible. But no one prevents you from using code like this:
<$if COND=(awfully complex condition))> <$define TEXT:color='#123456'> <$else> <$define TEXT:color='#001234'> </$if> <xBODY TEXT?=TEXT>Conditional assignments still seem to have a problem when being used within
<$let>
, therefor use them only for assignments
within tags and macros.